home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 13 / CU Amiga Magazine's Super CD-ROM 13 (1997)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1997-08].iso / CUCD / Graphics / Ghostscript / src / libpng / makefile.bor < prev    next >
Makefile  |  1996-06-05  |  3KB  |  166 lines

  1. # Makefile for libpng
  2. # Borland C++ 4.5 (Note: All modules are compiled in C mode)
  3. # Will work with C++ 4.02 also
  4. # To build the library, do: 
  5. #       "make -fmakefile.bor -DMODEL=m"
  6. # or:   "make -fmakefile.bor -DMODEL=l"
  7. #
  8. # ------------- Borland C++ 4.5 -------------
  9.  
  10. ### Absolutely necessary for this makefile to work
  11. .AUTODEPEND
  12.  
  13. ## Useful user options
  14.  
  15. # Usually defined in builtins.mak or the environment
  16. # Currently unused.
  17. !ifndef BCROOT
  18. BCROOT=N:\BC45
  19. !endif
  20.  
  21. # Where zlib.h and zconf.h and zlib.lib are
  22. ZLIB_PATH=..\zlib
  23.  
  24. !ifndef MODEL
  25. MODEL=l
  26. !endif
  27.  
  28. #TARGET_CPU=3
  29. # 2 = 286, 3 = 386, etc.
  30. !ifndef TARGET_CPU
  31. TARGET_CPU=2
  32. !endif
  33.  
  34.  
  35. # Use this if you don't want Borland's fancy exception handling.
  36. NOEHLIB=noeh$(MODEL).lib
  37.  
  38. !ifdef DEBUG
  39. CDEBUG=-v
  40. LDEBUG=-v
  41. !else
  42. CDEBUG=
  43. LDEBUG=
  44. !endif
  45.  
  46. # STACKOFLOW=1
  47. !ifdef STACKOFLOW
  48. CDEBUG=$(CDEBUG) -N
  49. LDEBUG=$(LDEBUG) -N
  50. !endif
  51.  
  52.  
  53. ## Compiler, linker, and lib stuff
  54. CC=bcc
  55. LD=bcc
  56. LIB=tlib
  57.  
  58. MODELARG=-m$(MODEL)
  59.  
  60. # -X- turns on dependency generation in the object file
  61. # -w  sets all warnings on
  62. # -O2 optimize for speed
  63. # -Z  global optimization
  64. CFLAGS=-O2 -Z -X- -w -I$(ZLIB_PATH) -$(TARGET_CPU) $(MODELARG) $(CDEBUG)
  65.  
  66. # -M  generate map file
  67. LDFLAGS=-M $(LDEBUG)
  68.  
  69. O=obj
  70.  
  71. ## variables
  72. OBJS = \
  73.  png.$(O) \
  74.  pngerror.$(O) \
  75.  pngmem.$(O) \
  76.  pngpread.$(O) \
  77.  pngrcb.$(O) \
  78.  pngread.$(O) \
  79.  pngrio.$(O) \
  80.  pngrtran.$(O) \
  81.  pngrutil.$(O) \
  82.  pngtrans.$(O) \
  83.  pngwrite.$(O) \
  84.  pngwtran.$(O) \
  85.  pngwio.$(O) \
  86.  pngwutil.$(O)
  87.  
  88. LIBOBJS = \
  89.  +png.$(O) \
  90.  +pngerror.$(O) \
  91.  +pngmem.$(O) \
  92.  +pngpread.$(O) \
  93.  +pngread.$(O) \
  94.  +pngrcb.$(O) \
  95.  +pngrio.$(O) \
  96.  +pngrtran.$(O) \
  97.  +pngrutil.$(O) \
  98.  +pngtrans.$(O) \
  99.  +pngwrite.$(O) \
  100.  +pngwtran.$(O) \
  101.  +pngwio.$(O)
  102.  +pngwutil.$(O)
  103.  
  104. LIBNAME=libpng$(MODEL).lib
  105.  
  106.  
  107. ## Implicit rules
  108. # Braces let make "batch" calls to the compiler,
  109. # 2 calls instead of 12; space is important.
  110. .c.obj:
  111.     $(CC) $(CFLAGS) -c {$*.c }
  112.  
  113. .c.exe:
  114.     $(CC) $(CFLAGS) $(LDFLAGS) $*.c
  115.  
  116.  
  117. ## Major targets
  118. libpng: $(LIBNAME)
  119.  
  120. pngtest: pngtest$(MODEL).exe
  121.  
  122. test:
  123.     pngtest$(MODEL)
  124.  
  125.  
  126. ## Minor Targets
  127.  
  128. png.obj: png.c
  129. pngrcb.obj: pngrcb.c
  130. pngread.obj: pngread.c
  131. pngpread.obj: pngpread.c
  132. pngrtran.obj: pngrtran.c
  133. pngrutil.obj: pngrutil.c
  134. pngerror.obj: pngerror.c
  135. pngmem.obj: pngmem.c
  136. pngrio.obj: pngrio.c
  137. pngwio.obj: pngwio.c
  138. pngtrans.obj: pngtrans.c
  139. pngwrite.obj: pngwrite.c
  140. pngwtran.obj: pngwtran.c
  141. pngwutil.obj: pngwutil.c
  142.  
  143.  
  144. $(LIBNAME): $(OBJS)
  145.     -del $(LIBNAME)
  146.         $(LIB) $(LIBNAME) @&&|
  147. $(LIBOBJS), libpng$(MODEL)
  148. |
  149.  
  150.  
  151. pngtest$(MODEL).obj: pngtest.c
  152.     $(CC) $(CFLAGS) -opngtest$(MODEL) -c pngtest.c
  153.  
  154. pngtest$(MODEL).exe: pngtest$(MODEL).obj
  155.     $(CC) $(MODELARG) $(LDFLAGS) -L$(ZLIB_PATH) pngtest$(MODEL).obj $(LIBNAME) zlib$(MODEL).lib $(NOEHLIB)
  156.  
  157.  
  158. # Clean up anything else you want
  159. clean:
  160.     -del *.obj
  161.     -del *.lib
  162.     -del *.lst
  163.  
  164.  
  165. # End of makefile for libpng
  166.